package com.example.carrealtimepublisher.mapper;

import com.example.carrealtimepublisher.bean.AverageSpeed;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AverageSpeedMapper {

    // 必须有Select注解 且SQL正确
    @Select("SELECT\n" +
            "monitor_id monitorId,avg_speed avgSpeed,car_count carCount\n" +
            "from dws_average_speed_report LIMIT 100")
    List<AverageSpeed> queryAverageSpeed();
}
